<%@ page import="org.apache.shiro.SecurityUtils" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ page language="java" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>springmvc - shiro - index</title>
</head>
<body>
<shiro:user>
    欢迎：<shiro:principal/>。&nbsp;&nbsp;&nbsp; <a href="/logout">退出</a>
</shiro:user>

<h3>hello world</h3>

<%
    long timeout = SecurityUtils.getSubject().getSession().getTimeout();
    out.println(timeout+"毫秒");
%>
</body>
</html>